I am looking to add a "Refresh DXL Attributes" button to a dialog box, does anyone know how to do it? Alternatively, does anyone know the name of the DXL file and function behind the "Refresh DXL Attributes" option on the standard "Tools" menu so I can call that?
|
Re: Refresh DXL Attributes I've been able to run it using the following code: #include <utils\wipeattr.dxl> |
Re: Refresh DXL Attributes Rolan - Thu Apr 23 11:55:32 EDT 2009 eval_("#include <utils\wipeattr.dxl>") Alternatively, you can set the attribute value to null for all objects. This should force recalculation of the DXL attribute. |
Re: Refresh DXL Attributes Tony_Goodman - Fri Apr 24 09:21:45 EDT 2009 |
Re: Refresh DXL Attributes SystemAdmin - Mon Apr 27 08:40:53 EDT 2009 |
Re: Refresh DXL Attributes Rolan - Mon Apr 27 11:56:42 EDT 2009 |
Re: Refresh DXL Attributes SystemAdmin - Mon Apr 27 12:26:06 EDT 2009 I solved this problem like this
|
Re: Refresh DXL Attributes bungle_77 - Thu Jul 18 09:15:50 EDT 2013 I solved this problem like this
DXL attr values are NOT stored in the database and are not "saved". Therefore:
Other notes:
And a rather obscure nit-pick. It is possible to command to open "edit" a module but it comes back read-only. This happens when someone else has it open and you are prompted. You therefore need one of the following:
-Louie I routinely do this, open invisible, silent, and load the standard view rather than the default view m=edit (fullName itm,false, true, true) |
Re: Refresh DXL Attributes llandale - Thu Jul 18 16:42:12 EDT 2013 DXL attr values are NOT stored in the database and are not "saved". Therefore:
Other notes:
And a rather obscure nit-pick. It is possible to command to open "edit" a module but it comes back read-only. This happens when someone else has it open and you are prompted. You therefore need one of the following:
-Louie I routinely do this, open invisible, silent, and load the standard view rather than the default view m=edit (fullName itm,false, true, true) hi Louie if i don't move the current object it doesn't work., becouse it will be updated only the visible objects. I need to open in edit mode and save because my dxl attribute compute also other attributes.
|
Re: Refresh DXL Attributes bungle_77 - Fri Jul 19 03:43:39 EDT 2013 hi Louie if i don't move the current object it doesn't work., becouse it will be updated only the visible objects. I need to open in edit mode and save because my dxl attribute compute also other attributes.
I think you are saying [1] Your particular Attr-DXL changes something in the module other than the obj.attrDXLName value. Perhaps it does something like this:
[2] Your "whatever" has weird code that requires the "current" object. If so... [1] Your code doesn't refresh DXL attrs, it refreshes this other attr. [2] My guess is that you have some "poor" strategy and should re-think it. Relying on the "current object", IMO, is a likely mistake. -Louie |
Re: Refresh DXL Attributes llandale - Fri Jul 19 11:05:21 EDT 2013 I think you are saying [1] Your particular Attr-DXL changes something in the module other than the obj.attrDXLName value. Perhaps it does something like this:
[2] Your "whatever" has weird code that requires the "current" object. If so... [1] Your code doesn't refresh DXL attrs, it refreshes this other attr. [2] My guess is that you have some "poor" strategy and should re-think it. Relying on the "current object", IMO, is a likely mistake. -Louie you understood well. I tried many strategies, but they didn't work, if you have something to suggest, it will be welcome. |
Re: Refresh DXL Attributes Hi, i still didn't solve my problem. In my module i have three attributes A, B , C A is a DXL attribute in the code of A i set also the value for B & C I load a view that doesn't show A If i use eval_("#include <utils\wipeattr.dxl>") or i launch "Tools->Refresh DXL Attributes" B & C are not updated.
How can i solve this problem with DXL code? |
Re: Refresh DXL Attributes bungle_77 - Tue May 17 05:14:28 EDT 2016 Hi, i still didn't solve my problem. In my module i have three attributes A, B , C A is a DXL attribute in the code of A i set also the value for B & C I load a view that doesn't show A If i use eval_("#include <utils\wipeattr.dxl>") or i launch "Tools->Refresh DXL Attributes" B & C are not updated.
How can i solve this problem with DXL code? Try something like following pseudocode
obj.AttribueName = null |
Re: Refresh DXL Attributes DOORSHAM - Tue May 17 06:50:30 EDT 2016 Try something like following pseudocode
obj.AttribueName = null it doesn't work |
Re: Refresh DXL Attributes bungle_77 - Tue May 17 12:04:48 EDT 2016 it doesn't work You could of told us what you tried so we could see where you failed to implement correctly.
Help file says:
// resetting to (string null) |
Re: Refresh DXL Attributes My understanding is that the DXL attribute updates when it is 'accessed'. This access does not need to involve displaying the attribute value; it can simply be querying the attribute value. If you want to force an update of all your DXL attribute values which are not displayed then try a simple object loop DXL such as
Object o
This forced update of the DXL attribute (A) would then force an update of the dependent non-dxl attributes (B and C) which are currently displayed. Sean |
Re: Refresh DXL Attributes When the module has a lot of objects then the view will not update all the objects. I found that by doing an export and the dxl layout was not displaying correctly. Usually the dxl attribute works fine and it will update when you open the module or you change state, or when you refresh the module. Have you check if you can write in attributes B and C? But in general the dxl attribute will only be calculated the first time that will be accessed. That means the first time that you open the module, or when you change from read to edit. Also it will be calculated on events. You need to be displaying the dxl attribute when you are using refresh. You need an event to update the dxl attribute. Thus as above if you set the dxl attribute to null in a view it should be updated. But not every object in a view is updated at one time. |